﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Icinetic.FeedCategorySample.Entities
{
    public class RssItem : Entity
    {
        public string Id { get; set; }
        public string Title { get; set; }
        public string TitleAll { get; set; }
        public string Link { get; set; }
        public string Content { get; set; }
        public DateTime DateArticle { get; set; }
        public string Date { get; set; }
        public bool IsRead { get; set; }
        public string Image { get; set; }
        public string Category { get; set; }
        public DateTime ExpirationDate { get; set; }

        public string ZoomState { get; set; }
        public int RowSpan { get; set; }
        public int ColSpan { get; set; }
        public int RowPortraitSpan { get; set; }
        public int ColPortraitSpan { get; set; }

        public override bool Equals(object obj)
        {
            if (obj != null && obj.GetType().Equals(this.GetType()))
            {
                RssItem other = obj as RssItem;

                if ((object)other != null)
                {
                    return other.Id == Id
                        && other.Category == Category
                        && other.Content == Content
                        && other.Date == Date
                        && other.DateArticle == DateArticle
                        && other.Image == Image
                        && other.Link == Link
                        && other.Title == Title
                        && other.TitleAll == TitleAll;
                }
            }

            return base.Equals(obj);
        }

        public override int GetHashCode()
        {
            return base.GetHashCode();
        }
    }
}
